<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const list = [
        {
          id: '1',
          publishTime: '2007-11-01',
          img: 'http://dummyimage.com/150x150/79a2f2, 新竹市)',
          count: 0,
          distance: 7,
          mileage: 9,
          title: '宝马三系_交十量很性',
          desc: '支亲形劳际少做料程料最道般候集任样象口周周她必较且每该极研政',
          carAge: 14,
          price: 20,
          type: 1,
        },
        {
          id: '2',
          publishTime: '1975-12-06',
          img: 'http://dummyimage.com/150x150/c5f279, 北京市)',
          count: 0,
          distance: 4,
          mileage: 7,
          title: '宝马三系_族离必立如',
          desc: '他府三现比律局形半水反计事位光型如际养儿名心然第王原日被活上',
          carAge: 24,
          price: 77,
          type: 0,
        },
        {
          id: '3',
          publishTime: '1998-01-31',
          img: 'http://dummyimage.com/150x150/f279e8, 兴安盟)',
          count: 0,
          distance: 4,
          mileage: 1,
          title: '宝马三系_影动情',
          desc: '前置放族们照却反写率近制工些至更世因然阶面指质常头取收根取现',
          carAge: 14,
          price: 52,
          type: 1,
        },
        {
          id: '4',
          publishTime: '1975-12-09',
          img: 'http://dummyimage.com/150x150/79f2d8, 重庆市)',
          count: 0,
          distance: 2,
          mileage: 2,
          title: '宝马三系_公半下',
          desc: '子地华每队直无天对百面两间战通成技种部派列备议况许清社风地圆',
          carAge: 8,
          price: 70,
          type: 0,
        },
        {
          id: '5',
          publishTime: '1992-02-11',
          img: 'http://dummyimage.com/150x150/f2b579, 滁州市)',
          count: 0,
          distance: 8,
          mileage: 3,
          title: '宝马三系_深标达因公何上',
          desc: '式处市名半事更得王况量采南转种主复算织列即用用色更分员始制交',
          carAge: 19,
          price: 28,
          type: 1,
        },
        {
          id: '6',
          publishTime: '2019-01-29',
          img: 'http://dummyimage.com/150x150/9179f2, 常州市)',
          count: 0,
          distance: 9,
          mileage: 6,
          title: '宝马三系_现路目',
          desc: '论所受场子会些子生你图资采然感和气识极记见向写定没等界金太声',
          carAge: 12,
          price: 35,
          type: 0,
        },
        {
          id: '7',
          publishTime: '1983-05-02',
          img: 'http://dummyimage.com/150x150/83f279, 三亚市)',
          count: 0,
          distance: 11,
          mileage: 10,
          title: '宝马三系_克达极',
          desc: '质造值按儿管如高区权律性正等分集院克积全建支时消水问先济处此',
          carAge: 12,
          price: 67,
          type: 1,
        },
        {
          id: '8',
          publishTime: '2015-07-14',
          img: 'http://dummyimage.com/150x150/f279a7, 定西市)',
          count: 0,
          distance: 71,
          mileage: 9,
          title: '宝马三系_有红京道容月社',
          desc: '特装再车管革人成而月千力改争亲基头制发阶般场农八集她商利理们',
          carAge: 14,
          price: 76,
          type: 0,
        },
        {
          id: '9',
          publishTime: '1994-02-13',
          img: 'http://dummyimage.com/150x150/79caf2, 石嘴山市)',
          count: 0,
          distance: 48,
          mileage: 1,
          title: '宝马三系_金商克好',
          desc: '厂百办没党军量将反往收格设适细传及月照价少系法般它千复该况格',
          carAge: 4,
          price: 35,
          type: 1,
        },
        {
          id: '10',
          publishTime: '1983-12-24',
          img: 'http://dummyimage.com/150x150/edf279, 阿里地区)',
          count: 0,
          distance: 74,
          mileage: 1,
          title: '宝马三系_较来级内志',
          desc: '影据技才最做法毛就加达马自每进引住线革东育查先人别较水广好来',
          carAge: 2,
          price: 73,
          type: 0,
        },
      ]

      // const a = list.sort((a, b) => (a.mileage > b.mileage ? 1 : -1))
      // console.log(a, 'a')
      // console.log(list, 'list---')
      // 要求车龄小于4 且 里程小于5
      const a = list.filter((v) => v.carAge <= 10 && v.distance <= 5)
      console.log('a:', a)
    </script>
  </body>
</html>
